<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibDriver WS2812B: src/driver_ws2812b.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibDriver WS2812B
   &#160;<span id="projectnumber">1.0.0</span>
   </div>
   <div id="projectbrief">WS2812B full function driver</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('driver__ws2812b_8h.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">driver_ws2812b.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>driver ws2812b header file  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdint.h&gt;</code><br />
<code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
</div>
<p><a href="driver__ws2812b_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structws2812b__handle__s.html">ws2812b_handle_s</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">ws2812b handle structure definition  <a href="structws2812b__handle__s.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structws2812b__info__s.html">ws2812b_info_s</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">ws2812b information structure definition  <a href="structws2812b__info__s.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gae5540c5fee431b39d1a059e77d4a77e1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__base__driver.html#gae5540c5fee431b39d1a059e77d4a77e1">WS2812B_EACH_RESET_BIT_FRAME_LEN</a>&#160;&#160;&#160;512</td></tr>
<tr class="memdesc:gae5540c5fee431b39d1a059e77d4a77e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">ws2812b each reset bit frame length definition  <a href="group__ws2812b__base__driver.html#gae5540c5fee431b39d1a059e77d4a77e1">More...</a><br /></td></tr>
<tr class="separator:gae5540c5fee431b39d1a059e77d4a77e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4ed311131502d4a9f112056a8d4f4023"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__link__driver.html#ga4ed311131502d4a9f112056a8d4f4023">DRIVER_WS2812B_LINK_INIT</a>(HANDLE,  STRUCTURE)&#160;&#160;&#160;memset(HANDLE, 0, sizeof(STRUCTURE))</td></tr>
<tr class="memdesc:ga4ed311131502d4a9f112056a8d4f4023"><td class="mdescLeft">&#160;</td><td class="mdescRight">initialize ws2812b_handle_t structure  <a href="group__ws2812b__link__driver.html#ga4ed311131502d4a9f112056a8d4f4023">More...</a><br /></td></tr>
<tr class="separator:ga4ed311131502d4a9f112056a8d4f4023"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e74fcd73d577d01706521a7d3713df5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__link__driver.html#ga2e74fcd73d577d01706521a7d3713df5">DRIVER_WS2812B_LINK_SPI_10MHZ_INIT</a>(HANDLE,  FUC)&#160;&#160;&#160;(HANDLE)-&gt;spi_10mhz_init = FUC</td></tr>
<tr class="memdesc:ga2e74fcd73d577d01706521a7d3713df5"><td class="mdescLeft">&#160;</td><td class="mdescRight">link spi_10mhz_init function  <a href="group__ws2812b__link__driver.html#ga2e74fcd73d577d01706521a7d3713df5">More...</a><br /></td></tr>
<tr class="separator:ga2e74fcd73d577d01706521a7d3713df5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac7f6e4e290d0cd4390acf2654178f68e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__link__driver.html#gac7f6e4e290d0cd4390acf2654178f68e">DRIVER_WS2812B_LINK_SPI_DEINIT</a>(HANDLE,  FUC)&#160;&#160;&#160;(HANDLE)-&gt;spi_deinit = FUC</td></tr>
<tr class="memdesc:gac7f6e4e290d0cd4390acf2654178f68e"><td class="mdescLeft">&#160;</td><td class="mdescRight">link spi_deinit function  <a href="group__ws2812b__link__driver.html#gac7f6e4e290d0cd4390acf2654178f68e">More...</a><br /></td></tr>
<tr class="separator:gac7f6e4e290d0cd4390acf2654178f68e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5690d20be0f3ccf553c9348b79b8131a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__link__driver.html#ga5690d20be0f3ccf553c9348b79b8131a">DRIVER_WS2812B_LINK_SPI_WRITE_COMMAND</a>(HANDLE,  FUC)&#160;&#160;&#160;(HANDLE)-&gt;spi_write_cmd = FUC</td></tr>
<tr class="memdesc:ga5690d20be0f3ccf553c9348b79b8131a"><td class="mdescLeft">&#160;</td><td class="mdescRight">link spi_write_cmd function  <a href="group__ws2812b__link__driver.html#ga5690d20be0f3ccf553c9348b79b8131a">More...</a><br /></td></tr>
<tr class="separator:ga5690d20be0f3ccf553c9348b79b8131a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad96acb900fe5494fca54f6e09d7a1ea7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__link__driver.html#gad96acb900fe5494fca54f6e09d7a1ea7">DRIVER_WS2812B_LINK_DELAY_MS</a>(HANDLE,  FUC)&#160;&#160;&#160;(HANDLE)-&gt;delay_ms = FUC</td></tr>
<tr class="memdesc:gad96acb900fe5494fca54f6e09d7a1ea7"><td class="mdescLeft">&#160;</td><td class="mdescRight">link delay_ms function  <a href="group__ws2812b__link__driver.html#gad96acb900fe5494fca54f6e09d7a1ea7">More...</a><br /></td></tr>
<tr class="separator:gad96acb900fe5494fca54f6e09d7a1ea7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2fa848fe3582a8d5aa7008ee62bdf897"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__link__driver.html#ga2fa848fe3582a8d5aa7008ee62bdf897">DRIVER_WS2812B_LINK_DEBUG_PRINT</a>(HANDLE,  FUC)&#160;&#160;&#160;(HANDLE)-&gt;debug_print = FUC</td></tr>
<tr class="memdesc:ga2fa848fe3582a8d5aa7008ee62bdf897"><td class="mdescLeft">&#160;</td><td class="mdescRight">link debug_print function  <a href="group__ws2812b__link__driver.html#ga2fa848fe3582a8d5aa7008ee62bdf897">More...</a><br /></td></tr>
<tr class="separator:ga2fa848fe3582a8d5aa7008ee62bdf897"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga8e9cc95839b82bfd2baf02e566930593"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structws2812b__handle__s.html">ws2812b_handle_s</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__base__driver.html#ga8e9cc95839b82bfd2baf02e566930593">ws2812b_handle_t</a></td></tr>
<tr class="memdesc:ga8e9cc95839b82bfd2baf02e566930593"><td class="mdescLeft">&#160;</td><td class="mdescRight">ws2812b handle structure definition  <a href="group__ws2812b__base__driver.html#ga8e9cc95839b82bfd2baf02e566930593">More...</a><br /></td></tr>
<tr class="separator:ga8e9cc95839b82bfd2baf02e566930593"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4d2a587a69a1cc505cb403e5bd97e4da"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structws2812b__info__s.html">ws2812b_info_s</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__base__driver.html#ga4d2a587a69a1cc505cb403e5bd97e4da">ws2812b_info_t</a></td></tr>
<tr class="memdesc:ga4d2a587a69a1cc505cb403e5bd97e4da"><td class="mdescLeft">&#160;</td><td class="mdescRight">ws2812b information structure definition  <a href="group__ws2812b__base__driver.html#ga4d2a587a69a1cc505cb403e5bd97e4da">More...</a><br /></td></tr>
<tr class="separator:ga4d2a587a69a1cc505cb403e5bd97e4da"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga2d68712e7e7d1b8f8329217f7a153bc6"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__base__driver.html#ga2d68712e7e7d1b8f8329217f7a153bc6">ws2812b_info</a> (<a class="el" href="group__ws2812b__base__driver.html#ga4d2a587a69a1cc505cb403e5bd97e4da">ws2812b_info_t</a> *info)</td></tr>
<tr class="memdesc:ga2d68712e7e7d1b8f8329217f7a153bc6"><td class="mdescLeft">&#160;</td><td class="mdescRight">get chip's information  <a href="group__ws2812b__base__driver.html#ga2d68712e7e7d1b8f8329217f7a153bc6">More...</a><br /></td></tr>
<tr class="separator:ga2d68712e7e7d1b8f8329217f7a153bc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae6fbb749585737a343245f99a12541ee"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__base__driver.html#gae6fbb749585737a343245f99a12541ee">ws2812b_init</a> (<a class="el" href="group__ws2812b__base__driver.html#ga8e9cc95839b82bfd2baf02e566930593">ws2812b_handle_t</a> *handle)</td></tr>
<tr class="memdesc:gae6fbb749585737a343245f99a12541ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">initialize the chip  <a href="group__ws2812b__base__driver.html#gae6fbb749585737a343245f99a12541ee">More...</a><br /></td></tr>
<tr class="separator:gae6fbb749585737a343245f99a12541ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6fa1311ef2353ea55c58aa3bd7033e22"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__base__driver.html#ga6fa1311ef2353ea55c58aa3bd7033e22">ws2812b_deinit</a> (<a class="el" href="group__ws2812b__base__driver.html#ga8e9cc95839b82bfd2baf02e566930593">ws2812b_handle_t</a> *handle)</td></tr>
<tr class="memdesc:ga6fa1311ef2353ea55c58aa3bd7033e22"><td class="mdescLeft">&#160;</td><td class="mdescRight">close the chip  <a href="group__ws2812b__base__driver.html#ga6fa1311ef2353ea55c58aa3bd7033e22">More...</a><br /></td></tr>
<tr class="separator:ga6fa1311ef2353ea55c58aa3bd7033e22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga60effc5b5f3a3326ffaa3a856629d264"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__base__driver.html#ga60effc5b5f3a3326ffaa3a856629d264">ws2812b_write</a> (<a class="el" href="group__ws2812b__base__driver.html#ga8e9cc95839b82bfd2baf02e566930593">ws2812b_handle_t</a> *handle, uint32_t *rgb, uint32_t len, uint8_t *temp, uint32_t temp_len)</td></tr>
<tr class="memdesc:ga60effc5b5f3a3326ffaa3a856629d264"><td class="mdescLeft">&#160;</td><td class="mdescRight">write reset and color frame  <a href="group__ws2812b__base__driver.html#ga60effc5b5f3a3326ffaa3a856629d264">More...</a><br /></td></tr>
<tr class="separator:ga60effc5b5f3a3326ffaa3a856629d264"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9143c3d9bf67e15e3124f06a805cb9ee"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__base__driver.html#ga9143c3d9bf67e15e3124f06a805cb9ee">ws2812b_write_only_reset</a> (<a class="el" href="group__ws2812b__base__driver.html#ga8e9cc95839b82bfd2baf02e566930593">ws2812b_handle_t</a> *handle, uint32_t len, uint8_t *temp, uint32_t temp_len)</td></tr>
<tr class="memdesc:ga9143c3d9bf67e15e3124f06a805cb9ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">write the reset frame  <a href="group__ws2812b__base__driver.html#ga9143c3d9bf67e15e3124f06a805cb9ee">More...</a><br /></td></tr>
<tr class="separator:ga9143c3d9bf67e15e3124f06a805cb9ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac6fd3f9b02dff6d25690de921ae3e021"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__base__driver.html#gac6fd3f9b02dff6d25690de921ae3e021">ws2812b_write_only_color</a> (<a class="el" href="group__ws2812b__base__driver.html#ga8e9cc95839b82bfd2baf02e566930593">ws2812b_handle_t</a> *handle, uint32_t *rgb, uint32_t len, uint8_t *temp, uint32_t temp_len)</td></tr>
<tr class="memdesc:gac6fd3f9b02dff6d25690de921ae3e021"><td class="mdescLeft">&#160;</td><td class="mdescRight">write the color frame  <a href="group__ws2812b__base__driver.html#gac6fd3f9b02dff6d25690de921ae3e021">More...</a><br /></td></tr>
<tr class="separator:gac6fd3f9b02dff6d25690de921ae3e021"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf9000e2cf8036d77c73d9131f8e8e495"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ws2812b__base__driver.html#gaf9000e2cf8036d77c73d9131f8e8e495">ws2812b_set_reg</a> (<a class="el" href="group__ws2812b__base__driver.html#ga8e9cc95839b82bfd2baf02e566930593">ws2812b_handle_t</a> *handle, uint8_t *buf, uint16_t len)</td></tr>
<tr class="memdesc:gaf9000e2cf8036d77c73d9131f8e8e495"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the chip register  <a href="group__ws2812b__base__driver.html#gaf9000e2cf8036d77c73d9131f8e8e495">More...</a><br /></td></tr>
<tr class="separator:gaf9000e2cf8036d77c73d9131f8e8e495"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>driver ws2812b header file </p>
<p>Copyright (c) 2015 - present LibDriver All rights reserved</p>
<p>The MIT License (MIT)</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
<dl class="section version"><dt>Version</dt><dd>1.0.0 </dd></dl>
<dl class="section author"><dt>Author</dt><dd>Shifeng Li </dd></dl>
<dl class="section date"><dt>Date</dt><dd>2021-11-13</dd></dl>
<h3>history</h3>
<table class="doxtable">
<tr>
<th>Date </th><th>Version </th><th>Author </th><th>Description </th></tr>
<tr>
<td>2021/11/13 </td><td>1.0 </td><td>Shifeng Li </td><td>first upload </td></tr>
</table>

<p class="definition">Definition in file <a class="el" href="driver__ws2812b_8h_source.html">driver_ws2812b.h</a>.</p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="driver__ws2812b_8h.html">driver_ws2812b.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
